<!DOCTYPE html>
<html lang="en" >
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <script src="__STATIC__/js/base.js"></script>
    <title>提现</title>
    <link rel="stylesheet" href="__STATIC__/css/base.css">
    <link rel="stylesheet" href="__STATIC__/css/userinfo.css">
    <script src="__STATIC__/js/jquery-1.11.1.min.js"></script>
    <link rel="stylesheet" href="__STATIC__/css/index.css">
    <link rel="stylesheet" href="__STATIC__/js/layer_mobile/need/layer.css">
    <script src="__STATIC__/js/layer_mobile/layer.js"></script>
</head>
<body >
<section >
       <!--有银行卡-->
       <ul class="withdraw-ul type1" style="width: 100%">
           <li class="withdraw-card border-e8 clearfix bg-white">
               <div class="pull-left" style="margin-right: 0.74666667rem;">到账银行卡</div>
               <div class="pull-left">
                   <span class="col-blue" id="cardId">中国农业银行（4521）</span>
                   <span class="col-666">提现手续费率1.6%</span>
               </div>
           </li>
           <script>
               $(function(){
                   var cardId = getUrlParam('cardId');
                   if(cardId  != null){
                       $('#cardId').html('中国农业银行 '+cardId);
                   }
                   $('.withdraw-card').on('click',function(){
                       window.location.href="/cash.html";
                   });
               });
           </script>
           <li class="withdraw-account border-e8 bg-white">
               <div >提现金额</div>
               <div><span>¥</span> <span> <input type="text" placeholder="请输入金额" id='account'></span></div>
           </li>
           <!--可提现金额为零时候，全部提现隐藏-->
           <li class="can-withdraw-account bg-white clearfix">
           <div class="pull-left" style="color: #888">可提现金额¥200.00</div>
           <div class="pull-right col-blue">全部提现</div>
           </li>
           <!--有手续费显示手续费-->
           <li class="withdraw-service-charge" style=" padding: 0.42633333rem;color: #666">额外扣除￥3.20手续费（提现金额×0.016=手续费）</li>
           <input type="button" class="login-button" value="提现" id='toWithdraw' >
       </ul>
       <!--没银行卡-->
       <!--<ul class="withdraw-ul type1" style="width: 100%">-->
           <!--<li class="withdraw-account border-e8 bg-white">-->
               <!--<div >提现金额</div>-->
               <!--<div><span>¥</span> <span> <input type="text" placeholder="请输入金额" id='account'></span></div>-->
           <!--</li>-->
           <!--&lt;!&ndash;可提现金额为零时候，全部提现隐藏&ndash;&gt;-->
           <!--<li class="can-withdraw-account bg-white clearfix">-->
               <!--<div class="pull-left"  style="color: #888">可提现金额¥0.00</div>-->
               <!--&lt;!&ndash;<div class="pull-right col-blue">全部提现</div>&ndash;&gt;-->
           <!--</li>-->
           <!--&lt;!&ndash;有手续费显示手续费&ndash;&gt;-->
           <!--&lt;!&ndash;<li class="withdraw-service-charge" style=" padding: 0.42633333rem;color: #666">额外扣除￥3.20手续费（提现金额×0.016=手续费）</li>&ndash;&gt;-->
           <!--<input type="button" class="login-button" value="提现至新卡" id="toNewCard">-->
       <!--</ul>-->
   </div>
</section>
</body>
<script>
    $('#toNewCard').on('click',function(){
         window.location.href="account.html";
    });
    function jump(url){ window.location.href=url;}
    //ajax 请求余额 account
     var account ;
     account = 200;
    $('#account').on('change',function(){
        var insertAccount =  $('#account').val();
        if(insertAccount <=  account){
           var msg = '额外扣除￥3.20手续费（'+insertAccount+'×0.016=手续费）';

        }
        if(insertAccount> account){
            var msg = '输入提现金额超过账户余额';

        }
        $('.withdraw-service-charge').text(msg);
    });
    $('#toWithdraw').on('click',function(){
        //ajax请求
             //没有设置支付密码
        var  hasPayWpd='yes';
        if(hasPayWpd  =='no'){
            layer.open({
                content:'请先设置支付密码'
                ,skin: 'msg'
                ,time:3 //2秒后自动关闭
                ,end:function(){
                    jump('phoneValidate.html');
                }
            });
        }
        //设置了支付密码
        if(hasPayWpd  =='yes'){
            jump('capitalcash2.html');
        }
    });
</script>
</html>